git status
time=`date +'%F %T'`
user=`git config user.name`
txt=${time},user:${user},msg:$1
echo $txt
git add .;git commit -m"'${txt}'";
if [[ $3 ]]; then
  branch=$3
else
  branch=v1.2.1
fi
 # echo branch:${branch}
 # exit;


case $2 in
  1 )
  git push origin ${user}
    ;;
  # 2 )
  # git checkout ${branch};
  # git pull origin ${branch};
  # git push origin ${branch}
  #   ;;
  3 )
    git pull origin ${branch};
    git push origin ${user};
    # git push osc ${user};
    git checkout ${branch};git merge ${user};
    # git push osc  ${branch};
    git push origin  ${branch};
    git checkout ${user};
    chown -R aaron ../admin_front_src;
    ;;
  * )
  echo '请输入：1（${user}）2（${branch}）3.(${user}&${branch})'
  exit
    ;;
esac

echo "Done!"
